<#macro user_topics topics>
  <#list topics as topic>
  <#--<div class="media">
    <div class="media-body">
      <div class="title">
        <a href="/topic/${topic.id!}">${topic.title!}</a>
      </div>
      <p>
        &lt;#&ndash;<a href="/?tab=${topic.tab}">${topic.tab}</a>
        <span>•</span>&ndash;&gt;
        <span><a href="/user/${topic.user.username}">${topic.user.username}</a></span>
        <span class="hidden-sm hidden-xs">•</span>
        <span class="hidden-sm hidden-xs">${topic.replyCount!0}个回答</span>
        <span class="hidden-sm hidden-xs">•</span>
        <span class="hidden-sm hidden-xs">${topic.view!0}次浏览</span>
        <span>•</span>
        <span>${topic.formatDate(topic.inTime)}</span>
      </p>
    </div>
  </div>
    <#if topic_has_next>
    <div class="divide mar-top-5"></div>
    </#if>-->






  <div class="media">

      <div class="media-body">
          <div class="title">
              <a href="/topic/${topic.id!}">${topic.title!}</a> <p class="gray">${topic.formatDate2China(topic.inTime)}</p>
          </div>

          <span><#--<a href="/user/${topic.user.username!}">-->
              <#if (topic.user.nickname)?? && (topic.user.nickname) !="">
                   ${topic.user.nickname!}
              <#else>
                   ${topic.user.orgname!}
              </#if><#--</a>--></span>
          <br/>
          <span id="reply${topic.id!}" ></span>
          <script type="text/javascript">
              (function () {
                  $.ajax({
                      url: "/reply/replies/"+${topic.id!},
                      async: false,
                      cache: false,
                      type: "GET",
                      dataType: "json",
                      success: function (data) {
                          if(data.status == 200 ) {
//                            $("#reply").text(data.detail);
                              $("#reply${topic.id!}").html(data.data[0].content);
                          }

                      }
                  })
              })();
          </script>

          <p class="gray">

              <span class="hidden-sm hidden-xs">${topic.replyCount!0}个回答</span>
          <#--<span class="hidden-sm hidden-xs">•</span>
          <span class="hidden-sm hidden-xs">${topic.view!0}次浏览</span>-->


          </p>
      </div>
  </div>
    <#if topic_has_next>
    <div class="divide mar-top-5"></div>
    </#if>
  </#list>
</#macro>